Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rdf-store-stream

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rdf-store-stream

Create an RDF store from an RDF stream

  • 1.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1K
decreased by-40.61%
Maintainers
1
Weekly downloads
 
Created
Source

RDF Store Stream

Build status Coverage Status npm version

This package exposes a convenience function that allows RDF(JS) streams to be encapsulated into an RDF(JS) store.

The Store that will be returned is an N3.Store.

This library accepts RDFJS-compliant quads.

Installation

$ yarn install rdf-store-stream

This package also works out-of-the-box in browsers via tools such as webpack and browserify.

Require

import {storeStream} from "rdf-store-stream";

or

const storeStream = require("rdf-store-stream").storeStream;

Usage

Short example:

const store = await storeStream(quadStream);

Full example:

// Create an RDF stream
import rdfParser from "rdf-parse";
const quadStream = rdfParser.parse(fs.createReadStream('cartoons.ttl'), { contentType: 'text/turtle' });

// Import the stream into a store
const store = await storeStream(quadStream);

// Use the store
const resultStream = store.match(namedNode('http://example.org/subject'));

License

This software is written by Ruben Taelman.

This code is released under the MIT license.

Keywords

FAQs

Package last updated on 09 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc